<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">

<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="css/fonts/font-awesome.min.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-color.css">
    <link rel="stylesheet" href="css/appcan.icon.css">
    <link rel="stylesheet" href="css/appcan.control.css">
    <link rel="stylesheet" href="login_content/css/main.css">
    <link rel="stylesheet" href="index_content/my.css">
</head>

<body class="um-vp bc-bg" ontouchstart>
    <div class="ub ub-ver uinn-a3 ub-fv loginBg ub-img1">
        <div class="ub ub-ver uinn uinn-at1">
            <form method="post">
                <div class="umar-a uba bc-border bc-bg">
                    <div class="ub ub-ac ubb umh5 bc-border ">
                        <div class=" uinput ub ub-f1">
                            <div class="uinn fa fa-user sc-text"></div>
                            <input placeholder="手机/邮箱/用户名" type="text" class="ub-f1 bor-none" id="username">
                        </div>
                    </div>
                    <div class="ub ub-ac umh5 bc-border ">
                        <div class=" uinput ub ub-f1">
                            <div class="uinn fa fa-lock sc-text"></div>
                            <input placeholder="密码" type="password" class="umw4 ub-f1 bor-none" id="pwd">
                        </div>
                    </div>
                </div>
                <div class="ub ub-ver uinn">
                    <div class="ub ub-pe uinn-a6 sc-text-active ulev-4">
                        忘记密码
                    </div>
                    <div class="uinn-at1">
                        <div class="btn ub ub-ac bc-text-head ub-pc bc-btn uc-a1" id="submit">
                            登录
                        </div>
                    </div>
                    <div class="uinn-at2 ub bc-text-head ulev-4">
                        <div class="ub-f1">
                            立即注册
                        </div>
                        <div class="ub-f1 tx-r">
                            无账号快捷登录
                        </div>
                    </div>
                </div>
                <button type="submit" class="uinvisible"></button>
            </form>
        </div>
    </div>
    <script src="js/appcan.js"></script>
    <script src="js/appcan.control.js"></script>
    <script src="js/index.js"></script>
</body>
<script>
appcan.ready(function() {
    appcan.initBounce();
});
var userName = '123456';
appcan.locStorage.setVal('username', userName);
var passWord = '123456';
appcan.locStorage.setVal('password', passWord);
appcan.button('#submit', function() {
        var userName = $('#username').val();
        var passWord = $('#pwd').val();
        appcan.request.ajax({
            url: 'http://testmas.appcan.cn:9000/ODBC/login',
            method: 'post',
            data: {
                uName: userName,
                pwd: passWord
            },
            success: function() {
                var uName = appcan.locStorage.getVal('username');
                var pwd = appcan.locStorage.getVal('password');
                if (userName === uName && passWord === pwd) {
                    Win.open('index',8);
                } else {
                    appcan.window.confirm({
                        title: '提示',
                        content: '请检查用户名和密码是否正确？',
                        buttons: ['确定', '取消'],
                        callback: function(err, opId, dataType, data) {
                            console.log(err, opId, dataType, data);
                        }
                    })
                }
            }
        })
    })
    // $("#submit").on('click', function() {
    //     var userName = $('#username').val();
    //     var passWord = $('#pwd').val();
    //     appcan.request.ajax({
    //         url: 'http://testmas.appcan.cn:9000/ODBC/login',
    //         method: 'GET',
    //         data: {
    //             uName: userName,
    //             pwd: passWord
    //         },
    //         success: function(data) {
    //             if (userName === CurrentUser.username && passWord === CurrentUser.password) {
    //                 Win.open('index');
    //             } else {
    //                 appcan.window.confirm({
    //                     title: "提示",
    //                     content: "请检查用户名和密码是否正确？",
    //                     buttons: ['确定', '取消'],
    //                     callback: function(err, opId, dataType, data) {
    //                         if (data == 0) {

//                         }
//                     }
//                 });
//             }
//         },
//         error: function(error) {
//             console.log(error);
//         }
//     })
// })
</script>

</html>
